//
//  MJRefreshMoreFooter.m
//  Whatnet_iOS
//
//  Created by 北辰 on 2019/5/28.
//  Copyright © 2019 什么网络. All rights reserved.
//

#import "MJRefreshMoreFooter.h"

@implementation MJRefreshMoreFooter

-(void)prepare{
    [super prepare];
    // 隐藏状态
    self.stateLabel.hidden = YES;
    self.stateLabel.textColor = [UIColor whiteColor];
    
    // 设置普通状态的动画图片
    NSMutableArray *idleImages = [NSMutableArray array];
    for (int i = 16;i < 45 ;i++) {
        NSString *imageName = [NSString stringWithFormat:@"Tloading_000%d",i];
        UIImage *image = [UIImage imageNamed:imageName];
        [idleImages addObject:image];
    }
    [self setImages:idleImages duration:1.5 forState:MJRefreshStateIdle];
    
    // 设置即将刷新状态的动画图片（一松开就会刷新的状态）
    NSMutableArray *refreshingImages = [NSMutableArray array];
    for (int i = 16;i < 19 ;i++) {
        NSString *imageName = [NSString stringWithFormat:@"Tloading_000%d",i];
        UIImage *image = [UIImage imageNamed:imageName];
        [refreshingImages addObject:image];
    }
    [self setImages:refreshingImages forState:MJRefreshStatePulling];
    // 设置正在刷新状态的动画图片
    [self setImages:idleImages duration:1.5 forState:MJRefreshStateRefreshing];
}

@end
